<template>
  <div>
    <KeepAlive :include="['eone']">
      <router-view />
    </KeepAlive>
  </div>
</template>

<script lang="ts" setup>
import { effect } from "vue";

const msg = ref("hello");
let value = "one";
effect(() => {
  console.log("effect");
  value = msg.value;
  console.log("value", value);
});
msg.value = 123123;

const route = useRoute();
console.log(route.query.a, "route");
watch(
  route,
  (newVal, oldVal) => {
    console.log("执行了watch逻辑", route.query.a);
  },
  {
    immediate: true,
  }
);
</script>

<style lang="scss" scoped></style>
